package test;

public class arr implements Iterator {

    String[] i = {"ddd", "gfd", "gfd", "gfd", "gfd"};
    int current;

    public arr() {
        current = 0;
    }

    @Override
    public boolean hasNext() {
        if (current >= i.length || i[current] == null) {
            return false;
        } else {
            return true;
        }
    }

    @Override
    public Object next() {
        return i[current++];
    }


    
}
